﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using ASBCC.Workflow.Client;
using ASBCC.Workflow.K2Manager;

namespace BEGDC.CC.Web.Workflow.ActionPanel
{
    public partial class DefaultWorkflowActionPanel : WorkflowActionPanelBase
    {
        public override List<Button> GetActionButtonList()
        {
            List<Button> actionButtonList = new List<Button>();
            actionButtonList.Add(btnClose);
            actionButtonList.Add(btnEdit);
            actionButtonList.Add(btnSave);
            actionButtonList.Add(btnSubmit);
            actionButtonList.Add(btnResubmit);
            actionButtonList.Add(btnReplyAskForMore);
            actionButtonList.Add(btnApprove);
            actionButtonList.Add(btnReplyForwardBack);
            actionButtonList.Add(btnReview);
            actionButtonList.Add(btnValidate);
            actionButtonList.Add(btnAcknowledge);
            actionButtonList.Add(btnUpload);
            actionButtonList.Add(btnPostSave);
            actionButtonList.Add(btnPostSubmit);
            actionButtonList.Add(btnReject);
            actionButtonList.Add(btnForward);
            actionButtonList.Add(btnForwardBack);
            actionButtonList.Add(btnAskForMore);
            actionButtonList.Add(btnDiscard);
            actionButtonList.Add(btnWithdraw);
            actionButtonList.Add(btnDrawback);
            actionButtonList.Add(btnComment);
            actionButtonList.Add(btnLog);
            actionButtonList.Add(btnPrint);
            actionButtonList.Add(btnBack);
            return actionButtonList;
        }

        protected override void OnInit(EventArgs e)
        {
            AddAttributesForActionButton(btnClose, K2ActionType.Close, false, Resources.Workflow.Close);
            AddAttributesForActionButton(btnEdit, K2ActionType.Edit, false, Resources.Workflow.Edit);
            AddAttributesForActionButton(btnSave, K2ActionType.Save, false, Resources.Workflow.Save);
            AddAttributesForActionButton(btnSubmit, K2ActionType.Submit, true, Resources.Workflow.Submit);
            AddAttributesForActionButton(btnResubmit, K2ActionType.Resubmit, true, Resources.Workflow.Resubmit);
            AddAttributesForActionButton(btnReplyAskForMore, K2ActionType.ReplyAskForMore, true, Resources.Workflow.ReplyAskForMore);
            AddAttributesForActionButton(btnApprove, K2ActionType.Approve, true, Resources.Workflow.Approve);
            AddAttributesForActionButton(btnReplyForwardBack, K2ActionType.ReplyForwardBack, true, Resources.Workflow.ReplyForwardBack);
            AddAttributesForActionButton(btnReview, K2ActionType.Review, true, Resources.Workflow.Review);
            AddAttributesForActionButton(btnAcknowledge, K2ActionType.Acknowledge, true, Resources.Workflow.Acknowledge);
            AddAttributesForActionButton(btnValidate, K2ActionType.Validate, true, Resources.Workflow.Validate);
            AddAttributesForActionButton(btnUpload, K2ActionType.Upload, true, Resources.Workflow.Submit);
            AddAttributesForActionButton(btnPostSave, K2ActionType.PostSave, false, Resources.Workflow.PostSave);
            AddAttributesForActionButton(btnPostSubmit, K2ActionType.PostSubmit, true, Resources.Workflow.PostSubmit);
            AddAttributesForActionButton(btnReject, K2ActionType.Reject, true, Resources.Workflow.Reject);
            AddAttributesForActionButton(btnForward, K2ActionType.Forward, true, Resources.Workflow.Forward);
            AddAttributesForActionButton(btnForwardBack, K2ActionType.ForwardBack, true, Resources.Workflow.ForwardBack);
            AddAttributesForActionButton(btnAskForMore, K2ActionType.AskForMore, true, Resources.Workflow.AskForMore);
            AddAttributesForActionButton(btnDiscard, K2ActionType.Discard, true, Resources.Workflow.Discard);
            AddAttributesForActionButton(btnWithdraw, K2ActionType.Withdraw, true, Resources.Workflow.Withdraw);
            AddAttributesForActionButton(btnDrawback, K2ActionType.Drawback, true, Resources.Workflow.Drawback);
            AddAttributesForActionButton(btnComment, K2ActionType.Comment, false, Resources.Workflow.Comment);
            AddAttributesForActionButton(btnLog, K2ActionType.Log, false, Resources.Workflow.Log);
            AddAttributesForActionButton(btnPrint, K2ActionType.Print, false, Resources.Workflow.Print);
            AddAttributesForActionButton(btnBack, K2ActionType.Back, false, Resources.Workflow.Back);
            base.OnInit(e);
        }
    }
}